{% extends "layout.html" %}
{% block title %}
<title>首页</title>
{% endblock %}
{% block content %}
	  {% for article in articles %}
          <div class="blogs">
            <h3><a href="/">{{article.title}}</a></h3>

            {% for image in article.images.all %}
            	<figure><img src="{{ MEDIA_URL }}{{ image.image_file.url  }}" alt="" ></figure>
            {% endfor %}
	            <ul>
	              <p>{{ article.content|truncatechars:5 }}....</p>
	              <a href="" target="_blank" class="readmore">阅读全文&gt;&gt;</a>
	            </ul>
		            <p class="autor">
		            	<span>作者：{{article.author.username}}</span>
		            	<span>作者：
		            		{% load format_name %}
		            			{{ article.author.username|fmt_name }}
		            	</span>
		            	<span>标签：【<a href="/">{{article.cate_id.name}}</a>】</span>
		            </p>
            	<div class="dateview">{{article.publish_time}}</div>
           </div>
      {% endfor %}
{% endblock %}



